import request from '@/utils/request';

// 获取组织列表
export const getTenantList = (params) => {
	return request({
		url: '/tenant',
		method: 'get',
		params
	});
}

// 新增组织
export const addTenant = (data) => {
	return request({
		url: '/tenant',
		method: 'post',
		data
	});
}

// 编辑组织
export const updateTenant = (data) => {
	return request({
		url: `/tenant/${data.id}`,
		method: 'put',
		data
	});
}

// 删除组织
export const deleteTenant = (id) => {
	return request({
		url: `/tenant/${id}`,
		method: 'delete'
	});
}